package com.cuijq.counterv5.reporter;

import com.cuijq.counterv5.utils.EmailSender;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @Classname EmailReporter
 * @Description TODO
 * @Date 2021/4/30 14:16
 * @Created by CuiJQ
 */
public class EmailViewer {

  private EmailSender emailSender;
  private List toAddresses = new ArrayList<>();

  public EmailViewer() {
    this.emailSender = new EmailSender(/*省略参数*/);
  }

  public EmailViewer(EmailSender emailSender) {
    this.emailSender = emailSender;
  }

  public EmailViewer(List emailToAddresses) {
    this.toAddresses = emailToAddresses;
  }

  public void addToAddress(String address) {
    toAddresses.add(address);
  }

  public void output(Map requestStats, long startTimeInMillis,
      long endTimeInMills) { // format the requestStats to HTML style. // send it to email toAddresses. }
  }
}